home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************************
- *
- *
- * ObjectMacZapp -- a standard Mac OOP application template
- *
- *
- *
- * ZDragDropWindow.h -- the window object with drag and drop
- *
- *
- *
- *
- *
- * © 1996, Graham Cox
- *
- *
- *
- *
- *************************************************************************************************/
-
- #pragma once
-
- #ifndef __ZDRAGDROPWINDOW__
- #define __ZDRAGDROPWINDOW__
-
- #ifndef __ZWINDOW__
- #include "ZWindow.h"
- #endif
-
- #include <drag.h>
-
-
-
- class ZDragDropWindow : public ZWindow
- {
- public:
-
- ZDragDropWindow(ZCommander* aBoss, const short windowID);
- virtual ~ZDragDropWindow();
-
- virtual void InitZWindow();
-
- virtual void Drag( const Point startPt );
- virtual void Drop( const OSType flavour, const Ptr data, const long dataSize );
- virtual void DragHilite( const Boolean state, const DragReference theDrag );
- virtual Boolean AcceptsFlavour( const OSType aFlavour );
- virtual RgnHandle MakeDragRgn();
- virtual void MakeDragData( const DragReference theDrag );
-
- // lowest level handlers
-
- virtual void TrackTheDrag( const DragTrackingMessage theMessage, const DragReference theDrag);
- virtual void DropHandler( const DragReference theDrag );
-
- protected:
-
- // installers
-
- virtual void InstallDragHandlers();
- virtual void RemoveDragHandlers();
-
- // tracking handler methods
-
- virtual void EnteredHandler( const DragReference theDrag);
- virtual void EnteredWindow( const DragReference theDrag);
- virtual void InWindow( const DragReference theDrag);
- virtual void LeftWindow( const DragReference theDrag);
- virtual void LeftHandler( const DragReference theDrag);
-
- // set by TrackTheDrag while it is in progress:
-
- DragReference curDragRef;
- };
-
-
-
- Boolean MacHasDM();
-
- /*
-
- This window does everything that ZWindow does, but in addition supports drag and drop, if the
- Mac it is running on has the drag manager installed. You can override methods Drop() and Drag()
- to implement specific data types
-
- */
-
-
-
-
- #endif